<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.anhry.app.safety.util.Util"/>
<jsp:directive.page import="com.anhry.app.safety.manage.system.bean.TbUserDept"/>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>部门列表</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath %>/js/deptInfo.js"></script>
	<style type="text/css">
		.tree_input{height:19px;margin:0px;padding:0px;line-height:16px;vertical-align:middle;color: #16518d; background-color:#e7f3ff;border:#83a3ff solid 1px;padding-left:2px;padding-right:2px;font-size:12px;}
	</style>
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="<%=basePath %>/js/dbdialog/lhgdialog.min.js?self=false&<%=Util.DIALOG_SKIN%>"></script>
	<script type="text/javascript" src="<%=basePath %>/js/util.js"></script>
  </head>
  
  <body>
	<div  class="body-box">
		<div class="map">
			<div class="map_con">
				您当前的位置：系统管理 &gt; 部门维护
			</div>
		</div>
		<div id="container">
			<div class="tab_div">
				<div class="tab_on"><a href="<%=basePath%>/admin/dept_list.action?cType=1">安监局</a></div>
				<div class="tab"><a href="<%=basePath%>/admin/dept_list.action?cType=2">行业</a></div>
				<div class="tab"><a href="<%=basePath%>/admin/dept_list.action?cType=3">属地</a></div>
			</div>
			<div class="tab_con">
				<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
				   <tr>
				    <td valign="top">
				    	<div class="dtree">
				      		<span><a href="javascript: d.openAll();">全部展开</a> | <a href="javascript: d.closeAll();">全部收起</a></span>
				     	</div>
				     	<script type="text/javascript">
							 d = new dTree('d','<%=basePath%>');
							 d.add(1,-1,'市科室','null','null','null','','','','2','1');
					 		 d.add(2,-1,'县(市、区)、开发区科室','null','null','null','','','','3','1');
							<%  
								List deptList = (List)request.getAttribute("deptList");
								if(null!=deptList && deptList.size()>0){
								for(int i=0;i<deptList.size();i++){
									TbUserDept dept = (TbUserDept)deptList.get(i);				
							%>		    						
							   d.add(<%=dept.getId()%>,<%=dept.getDeptParentId()%>,'<%=dept.getDeptName()%>','','null','','','','','<%=dept.getDeptGrade()%>','1');   
							<%			
							}
							}
							%>
							document.write(d);
						</script>
				     </td>
				   </tr>
				  </table>
			</div>
		</div>
	</div>
  </body>
  <s:if test="%{tip!=null}">
    	<script>
    		msgDialog('${tip}', 'succ.png');
    	</script>
    </s:if>
</html>
